'use strict';

function makeRequest(url, timeout = 2000, callback = function () {}) {
  console.log(url);
  console.log(timeout);
  console.log(callback);
}
function mixArgs(first, second = 'b') {
  console.log(arguments.length);
  console.log(first === arguments[0]);
  console.log(second === arguments[1]);
  first = 'c';
  second = 'd';
  console.log(first === arguments[0]);
  console.log(second === arguments[1]);
}

function mixArgs_nodefault(first, second) {
  console.log(arguments.length);
  console.log(first === arguments[0]);
  console.log(second === arguments[1]);
  first = 'c';
  second = 'd';
  console.log(first === arguments[0]);
  console.log(second === arguments[1]);
}

function add(first = second, second) {
  return first + second;
}

function pick(object, ...keys) {
  let result = Object.create(null);
  for (let i = 0, len = keys.length; i < len; i++) {
    result[keys[i]] = object[keys[i]];
  }
  return result;
}

module.exports = {
  makeRequest,
  mixArgs,
  mixArgs_nodefault,
  add,
};
